var { merge } = require("webpack-merge");
var baseConf = require("./webpack.base.config");
var devConf = require("./webpack.dev.config");
var proConf = require("./webpack.prod.config");
var BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;

const env = process.env.NODE_ENV || "";
!!process.env.SHOW_VIEW && baseConf.plugins.push(new BundleAnalyzerPlugin());
let conf = {};

conf = merge({}, baseConf, env === "development" ? devConf : proConf);

module.exports = conf